<?php

use Illuminate\Database\Seeder;

class GoodsSeeder extends Seeder
{
    /**
     * Run the database seeds.
     *
     * @return void
     */
    public function run()
    {
         $data = [];

        for ($i=0; $i < 20; $i++) { 
        	$tmp = [];
        	$tmp['title'] = str_random(10);
        	$tmp['price'] = rand(1,1000);
        	$tmp['cost'] = rand(1,1000);
        	$tmp['grade'] = rand(1,100);
        	$tmp['color'] = rand(1,100);
        	$tmp['size'] = rand(1,100);
        	$tmp['kucun'] = rand(1,100);
        	$tmp['detail'] = rand(1,1000);
        	$tmp['status'] = rand(0,1);
        	$data[] = $tmp;
        }
        DB::table('goods')->insert($data);
    }
}
